﻿using System;
using System.Text;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Web.UI;
using System.IO;
using Microsoft.SharePoint;

namespace SampleWebParts
{
  [TestClass]
  public class ListViewer_UnitTest : ListViewer
  {
    [TestMethod]
    public void Show_list_of_Categories()
    {
      SPContext.Initialize("test_site");
      ListName = "Categories";
      StringWriter sw = new StringWriter();
      HtmlTextWriter writer = new HtmlTextWriter(sw);
      EnsureChildControls();
      RenderContents(writer);
      Assert.IsTrue(FakePoint.Test.Verify(sw.ToString()));
    }
  }
}
